package tw.zld369504.wol.action;

import android.os.Bundle;

import java.util.List;

import tw.zld369504.wol.activity.DeviceListActivity;
import tw.zld369504.wol.model.Profile;
import tw.zld369504.wol.utils.DBOperation;

/**
 * profile list activity controller
 */
public class DeviceListActivityController implements DeviceListActivityActionInterface{
    private DeviceListActivity activity;
    public DeviceListActivityController(DeviceListActivity activity){
        this.activity=activity;
    }

    @Override
    public void loadProfileFromDb() {
        activity.showProgressDialog();
        List<Profile> mList= DBOperation.getInstance(activity).getAllProfileFromDb();
        activity.dismissProgressDialog();
    }

    @Override
    public void onCreate(Bundle bundle) {

    }

    @Override
    public void onDestroy() {
        this.activity=null;
    }
}
